<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      function makePower(pow) {
        return function (number) {
          return Math.pow(number, pow);
        };
      }

      const p1 = makePower(2);
      const p2 = makePower(3);

      console.log(p1(2));
      console.log(p2(3));
    </script>
  </body>
</html>
